<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.one}" var="users"/>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<title>查看个人信息 - 用户中心</title>
		<%@ include file="/common/include/title.jsp"%>
	</head>
	<body>
		<%@ include file="/common/include/header.jsp"%>
		<!-- 网页的主体部分 -->
		<div class="container">
			<div class="row">
				<div class="col-md-11 col-sm-offset-1">
					<div class="table-responsive mt-2">
						<table class="table table-striped table-hover">
							<thead>
								<tr>
									<th colspan="2">基本信息</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>邮箱</td>
									<td>${users.email}</td>
								</tr>
								<tr>
									<td>昵称</td>
									<td>${users.nickName }</td>
								</tr>
								<tr>
									<td>真实姓名</td>
									<td>${users.trueName }</td>
								</tr>
								<tr>
									<td>qq</td>
									<td>${users.qq }</td>
								</tr>
								<tr>
									<td>手机</td>
									<td>${users.phone }</td>
								</tr>
								<tr>
									<td>微信</td>
									<td>${users.weiXin }</td>
								</tr>
								<tr>
									<td>生日</td>
									<td>${users.birthday }</td>
								</tr>
								<tr>
									<td>登陆次数</td>
									<td>${users.loginCount }</td>
								</tr>
								<tr>
									<td>籍贯</td>
									<td>
										<c:choose>
											<c:when test="${fn:contains(users.region.treeName,'|-->')}">
												${fn:replace(users.region.treeName,'|-->','  ')}
											</c:when>
											<c:otherwise>
												${users.region.treeName}
											</c:otherwise>
										</c:choose>
										<br/>
										${users.address }
									</td>
								</tr>
								<tr>
									<td>最高学历</td>
									<td>${users.educationStr }</td>
								</tr>
								<tr>
									<td>性别</td>
									<td>${users.sexStr }</td>
								</tr>
								<tr>
									<td>用户类型</td>
									<td>${users.usersTypeStr }</td>
								</tr>
								<tr>
									<td>创建时间</td>
									<td>${users.createTime }</td>
								</tr>
								<tr>
									<td>更新时间</td>
									<td>${users.updateTime}</td>
								</tr>
								<tr>
									<td>上次登陆时间</td>
									<td>${users.lastLoginTime}</td>
								</tr>
								<tr>
									<td>头像</td>
									<td>
										<c:choose>
											<c:when test="${users.photoPath != null && users.photoPath != ''}">
												<a target="_blank" href="${requestScope.websiteFileUrl }${users.photoPath }">
												<img src="${requestScope.websiteFileUrl }${users.photoPath }" 
												class="img-fluid rounded mx-auto" width="200" height="200">
												</a>	
											</c:when>
											<c:otherwise>
												<a target="_blank" href="${rootPath}/img/no_pic.png">										
												<img src="${rootPath}/img/no_pic.png" 
											class="img-fluid rounded mx-auto" width="200" height="200">
												</a>
										</c:otherwise>
										</c:choose>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<%@ include file="/common/include/footer.jsp"%>
	</body>
</html>